//
//  SegmentSelectedTransitionContext.swift
//  PageNavigator
//
//  Created by 张奇 on 2025/8/14.
//

import UIKit

public struct SegmentSelectedTransitionContext {
    let selectedIndex: Int
    let from: Int
    let to: Int
    let fromItemFrame: CGRect
    let toItemFrame: CGRect
    let fromContentSize: () -> CGSize
    let toItemContentSize: () -> CGSize
    
    public init(selectedIndex: Int,
                from: Int,
                to: Int,
                fromItemFrame: CGRect,
                toItemFrame: CGRect,
                fromContentSize: @escaping () -> CGSize,
                toItemContentSize: @escaping () -> CGSize) {
        self.selectedIndex = selectedIndex
        self.from = from
        self.to = to
        self.fromItemFrame = fromItemFrame
        self.toItemFrame = toItemFrame
        self.fromContentSize = fromContentSize
        self.toItemContentSize = toItemContentSize
    }
}
